﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SPOooON.SDK.Matrix
{
    public class Matrix<T>
    {
        private int width;
        private int height;
        private T[] content;

        public Matrix(int width, int height)
        {
            this.width = width;
            this.height = height;
            content = new T[width * height];
        }

        public T this[int x, int y]
        {
            get { return content[(y * width) + x]; }
            set { content[(y * width) + x] = value; }
        }
    }
}
